﻿using System;

// 抽象动物类Animal
abstract class Animal
{
    public string Name { get; set; }

    public Animal(string name)
    {
        Name = name;
    }

    public abstract void Enjoy();
}

// Cat类（继承Animal）
class Cat : Animal
{
    public string EyesColor { get; set; }

    public Cat(string name, string eyesColor) : base(name)
    {
        EyesColor = eyesColor;
    }

    public override void Enjoy() => Console.WriteLine($"{Name}（{EyesColor}眼睛的猫）：喵喵叫，摇尾巴");
}

// Dog类（继承Animal）
class Dog : Animal
{
    public string FurColor { get; set; }

    public Dog(string name, string furColor) : base(name)
    {
        FurColor = furColor;
    }

    public override void Enjoy() => Console.WriteLine($"{Name}（{FurColor}毛色的狗）：汪汪叫，摇尾巴");
}

// Lady类
class Lady
{
    public string Name { get; set; }
    public Animal Pet { get; set; }

    public Lady(string name, Animal pet)
    {
        Name = name;
        Pet = pet;
    }

    public void MyPetEnjoy() => Pet.Enjoy();
}

// 测试类
class Program
{
    static void Main(string[] args)
    {
        Cat cat = new Cat("小白", "蓝色");
        Lady missZhang = new Lady("张女士", cat);
        missZhang.MyPetEnjoy();

        Dog dog = new Dog("小黑", "黑色");
        Lady missWang = new Lady("王女士", dog);
        missWang.MyPetEnjoy();
    }
}
